/**
 * Created by 王健 on 2017/8/31.
 */

function phone_type() {
    var u = navigator.userAgent, app = navigator.appVersion;
    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
    var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

    var ua = window.navigator.userAgent.toLowerCase();
    var is_wx = false;
    if (ua.match(/MicroMessenger/i) == 'micromessenger') {
        is_wx = true;
    } else {
        is_wx = false;
    }

    return {is_android: isAndroid, is_ios: isIOS, is_wx: is_wx};
}